Ext.define('passport.main.WestPanel', {
    extend: 'Ext.panel.Panel',
        collapsible: true,
        width: 225,
        floatable: false,
        split: true,
        title: '',
        minWidth: 175,
        createMenuTree: function(){
        	
	        this.menuTree = Ext.create('passport.trees.Menu', {   
	        	region: 'center'
	        });
	         this.menuTree.on('itemdblclick', 
	         
	         	function(view,record,item,index,e){
		         	if(record!=null && record.raw.leaf){
			    			var mainTabPanel = Ext.dd.Registry.getTarget('mainTabPanel').ddel;
			    			mainTabPanel.addTabItem(record.raw.id);
		    		}
			 	}
			 );
	        return this.menuTree;
	  		},
		    initComponent: function() {
		    	Ext.apply(this, {
            items: this.createMenuTree()
        	});
		      this.callParent();
		    }
})